package org.puppet.demo.tank.tanks;

import java.util.HashMap;
import java.util.Map;

import org.puppet.demo.tank.R;
import org.puppet.demo.tank.bullets.DualBullet;
import org.puppet.demo.tank.puppet.Bullet;
import org.puppet.demo.tank.puppet.Tank;
import org.puppet.game.base.PuppetUtils;
import org.puppet.game.element.PuppetInfo;
import org.puppet.game.element.PuppetInfo.AnimInfo;

import android.content.Resources;

public class DualTank extends Tank {

	public DualTank() {
		super();
		bulletX = 0.5f;
		bulletY = -30f;
	}

	@Override
	protected PuppetInfo getAnimationInfo(Resources res) {
		PuppetInfo info = new PuppetInfo();
		info.setBitmap(PuppetUtils.createBitmap(res, R.drawable.tank));
		info.setFrameHeight(40);
		info.setFrameWidth(40);
		
		info.setAnims(new AnimInfo[]{
				new AnimInfo(0, new long[]{1000}, 20, 40),
				new AnimInfo(2, new long[]{20, 20, 20}, 20, 40),
				new AnimInfo(2, new long[]{20, 20, 20}, 20, 40),
				new AnimInfo(1, new long[]{100000}, 20, 40)
		});
		return info;
	}

	@Override
	protected Map<Integer, Bullet> getBullets() {
		Map<Integer, Bullet> bullets = new HashMap<Integer, Bullet>();
		bullets.put(1, new DualBullet(this));
		return bullets;
	}

}
